
<html><HEAD>
<LINK REL=STYLESHEET HREF="default.css" TYPE="text/css">
<TITLE>
Supplying property values</TITLE>
</HEAD>
<BODY>

<!-- Header -->
<p class="ancestor" align="right"><A HREF="pbugp216.htm">Previous</A>&nbsp;&nbsp;<A HREF="pbugp218.htm" >Next</A>
<!-- End Header -->
<A NAME="CAIEAIJC"></A><h1>Supplying property values</h1>
<A NAME="TI7082"></A><p>Each property has its own set of property values that you
can use to specify the true and false conditions in the <b>If</b> expression.
Usually you specify a number to indicate what you want. For example,
if you are working with the Border property, you use the number
0, 1, 2, 3, 4, 5, or 6 to specify a border.</p>
<A NAME="TI7083"></A><p><A HREF="pbugp217.htm#BEIIBEBA">Table 24-1</A> summarizes
the properties available. A detailed description of each property
follows the table. For a complete list of properties for each control, see
the online Help.</p>
<p><img src="images/note.gif" width=17 height=17 border=0 align="bottom" alt="Note"> <span class=shaded>Valid values of properties are shown in parentheses
in the Properties view wherever possible.</span> <A NAME="TI7084"></A>For example, the drop-down list showing border selections
includes the correct number for specifying each border in parentheses
after the name of the border (ShadowBox (1), Underline (4)).</p>
<A NAME="BEIIBEBA"></A><table cellspacing=0 cellpadding=6 border=1 frame="void" rules="all"><caption>Table 24-1: Properties for
controls in the DataWindow painter</caption>
<tr><th  rowspan="1"  ><A NAME="TI7085"></A>Property</th>
<th  rowspan="1"  ><A NAME="TI7086"></A>Painter option
in Properties view</th>
<th  rowspan="1"  ><A NAME="TI7087"></A>Description</th>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI7088"></A><A HREF="pbugp217.htm#CAIBJEFB">Background.Color </A></td>
<td  rowspan="1"  ><A NAME="TI7089"></A>Background Color on Background page or
Font page</td>
<td  rowspan="1"  ><A NAME="TI7090"></A>Background color of a control</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI7091"></A><A HREF="pbugp217.htm#CAIBFACJ">Border</A></td>
<td  rowspan="1"  ><A NAME="TI7092"></A>Border on General page</td>
<td  rowspan="1"  ><A NAME="TI7093"></A>Border of a control</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI7094"></A><A HREF="pbugp217.htm#CAICJDII">Brush.Color</A></td>
<td  rowspan="1"  ><A NAME="TI7095"></A>Brush Color on General page</td>
<td  rowspan="1"  ><A NAME="TI7096"></A>Color of a graphic control</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI7097"></A><A HREF="pbugp217.htm#CAIEBACD">Brush.Hatch</A></td>
<td  rowspan="1"  ><A NAME="TI7098"></A>Brush Hatch on General page</td>
<td  rowspan="1"  ><A NAME="TI7099"></A>Pattern used to fill a graphic control</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI7100"></A><A HREF="pbugp217.htm#CAIDAJJC">Color</A></td>
<td  rowspan="1"  ><A NAME="TI7101"></A>Text Color on Font page; Color on General
page; Line Color on General page</td>
<td  rowspan="1"  ><A NAME="TI7102"></A>Color of text for text controls, columns,
and computed fields; background color for the DataWindow object; line color
for graphs</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI7103"></A><A HREF="pbugp217.htm#CAIBHCDI">Font.Escapement (for rotating
controls)</A></td>
<td  rowspan="1"  ><A NAME="TI7104"></A>Escapement on Font page</td>
<td  rowspan="1"  ><A NAME="TI7105"></A>Rotation of a control</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI7106"></A><A HREF="pbugp217.htm#CAIEAHGE">Font.Height</A></td>
<td  rowspan="1"  ><A NAME="TI7107"></A>Size on Font page</td>
<td  rowspan="1"  ><A NAME="TI7108"></A>Height of text</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI7109"></A><A HREF="pbugp217.htm#CAIBCIHG">Font.Italic</A></td>
<td  rowspan="1"  ><A NAME="TI7110"></A>Italic on Font page</td>
<td  rowspan="1"  ><A NAME="TI7111"></A>Use of italic font for text</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI7112"></A><A HREF="pbugp217.htm#CAIDIIJE">Font.Strikethrough</A></td>
<td  rowspan="1"  ><A NAME="TI7113"></A>Strikeout on Font page</td>
<td  rowspan="1"  ><A NAME="TI7114"></A>Use of strikethrough for text</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI7115"></A><A HREF="pbugp217.htm#CAIBFBEH">Font.Underline</A></td>
<td  rowspan="1"  ><A NAME="TI7116"></A>Underline on Font page</td>
<td  rowspan="1"  ><A NAME="TI7117"></A>Use of underlining for text</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI7118"></A><A HREF="pbugp217.htm#CAIDCBID">Font.Weight</A></td>
<td  rowspan="1"  ><A NAME="TI7119"></A>Bold on Font page</td>
<td  rowspan="1"  ><A NAME="TI7120"></A>Weight (for example, bold) of text font</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI7121"></A><A HREF="pbugp217.htm#CAICAFCH">Format</A></td>
<td  rowspan="1"  ><A NAME="TI7122"></A>Format on Format page</td>
<td  rowspan="1"  ><A NAME="TI7123"></A>Display format for columns and computed
fields</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI7124"></A><A HREF="pbugp217.htm#CAIEAIGD">Height</A></td>
<td  rowspan="1"  ><A NAME="TI7125"></A>Height on Position page</td>
<td  rowspan="1"  ><A NAME="TI7126"></A>Height of a control</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI7127"></A><A HREF="pbugp217.htm#CAIBFEDB">Pen.Color</A></td>
<td  rowspan="1"  ><A NAME="TI7128"></A>Pen Color on General page</td>
<td  rowspan="1"  ><A NAME="TI7129"></A>Color of a line or the line surrounding
a graphic control</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI7130"></A><A HREF="pbugp217.htm#CAIEADFB">Pen.Style</A></td>
<td  rowspan="1"  ><A NAME="TI7131"></A>Pen Style on General page</td>
<td  rowspan="1"  ><A NAME="TI7132"></A>Style of a line or the line surrounding
a graphic control</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI7133"></A><A HREF="pbugp217.htm#CAIEAHDJ">Pen.Width</A></td>
<td  rowspan="1"  ><A NAME="TI7134"></A>Pen Width on General page</td>
<td  rowspan="1"  ><A NAME="TI7135"></A>Width of a line or the line surrounding
a graphic control</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI7136"></A><A HREF="pbugp217.htm#CAIEBCGD">Pointer</A></td>
<td  rowspan="1"  ><A NAME="TI7137"></A>Pointer on Pointer page</td>
<td  rowspan="1"  ><A NAME="TI7138"></A>Image to be used for the pointer</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI7139"></A><A HREF="pbugp217.htm#BABBCJCB">Protect</A></td>
<td  rowspan="1"  ><A NAME="TI7140"></A>Protect on General page</td>
<td  rowspan="1"  ><A NAME="TI7141"></A>Whether a column can be edited</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI7142"></A><A HREF="pbugp217.htm#BABCFFEB">Timer_Interval</A></td>
<td  rowspan="1"  ><A NAME="TI7143"></A>Timer Interval on General page</td>
<td  rowspan="1"  ><A NAME="TI7144"></A>How often time fields are to be updated</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI7145"></A><A HREF="pbugp217.htm#CAIDBCGI">Visible</A></td>
<td  rowspan="1"  ><A NAME="TI7146"></A>Visible on General page</td>
<td  rowspan="1"  ><A NAME="TI7147"></A>Whether a control is visible</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI7148"></A><A HREF="pbugp217.htm#CAIBJCCI">Width</A></td>
<td  rowspan="1"  ><A NAME="TI7149"></A>Width on Position page</td>
<td  rowspan="1"  ><A NAME="TI7150"></A>Width of a control</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI7151"></A><A HREF="pbugp217.htm#CAIDHAAF">X</A></td>
<td  rowspan="1"  ><A NAME="TI7152"></A>X on Position page</td>
<td  rowspan="1"  ><A NAME="TI7153"></A>X position of a control</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI7154"></A><A HREF="pbugp217.htm#CAICEIIC">X1, X2</A></td>
<td  rowspan="1"  ><A NAME="TI7155"></A>X1, X2 on Position page</td>
<td  rowspan="1"  ><A NAME="TI7156"></A>X coordinates of either end of a line</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI7157"></A><A HREF="pbugp217.htm#CAIDJCEB">Y</A></td>
<td  rowspan="1"  ><A NAME="TI7158"></A>Y on Position page</td>
<td  rowspan="1"  ><A NAME="TI7159"></A>Y position of a control relative to the
band in which it is located</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI7160"></A><A HREF="pbugp217.htm#CAIBHJBJ">Y1, Y2</A></td>
<td  rowspan="1"  ><A NAME="TI7161"></A>Y1, Y2 on Position page</td>
<td  rowspan="1"  ><A NAME="TI7162"></A>Y coordinates of either end of a line</td>
</tr>
</table>
<A NAME="CAIBJEFB"></A><h2>Background.Color </h2>
<A NAME="TI7163"></A><h4>Description</h4>
<A NAME="TI7164"></A><p>Setting for the background color of a control.</p>
<A NAME="TI7165"></A><h4>In the painter</h4>
<A NAME="TI7166"></A><p>Background Color on the Background page or Font page in the
Properties view.</p>
<A NAME="TI7167"></A><h4>Value</h4>
<A NAME="TI7168"></A><p>A number that specifies the control's background
color.</p>
<A NAME="TI7169"></A><p>For information on specifying colors, see <A HREF="pbugp218.htm#CAIBJHCI">"Specifying colors"</A>.</p>
<A NAME="TI7170"></A><p>The background color of a line is the color that displays
between the segments of the line when the pen style is not solid.</p>
<A NAME="TI7171"></A><p>If Background.Mode is transparent (1), Background.Color is
ignored.</p>
<A NAME="TI7172"></A><h4>Example</h4>
<A NAME="TI7173"></A><p>The following statement specifies that if the person represented
by the current row uses the day care benefit, the background color
of the control is set to light gray (15790320). If not, the background
color is set to white (16777215):<p><PRE> If(bene_day_care = 'Y', 15790320, 16777215)</PRE></p>
<A NAME="TI7174"></A><p>In this example, the condition is applied to the Background.Color
property for three controls: the <b>emp_id </b>column,
the <b>emp_fname</b> column, and the <b>emp_lname</b> column.</p>
<A NAME="TI7175"></A><p>The following is a portion of the resulting DataWindow object. Notice
that the employee ID, first name, and last name have a gray background
if the employee uses the day care benefit:</p>
<br><img src="images/cond075.gif">
<A NAME="CAIBFACJ"></A><h2>Border</h2>
<A NAME="TI7176"></A><h4>Description</h4>
<A NAME="TI7177"></A><p>The type of border for the control.</p>
<A NAME="TI7178"></A><h4>In the painter</h4>
<A NAME="TI7179"></A><p>Border on the General page in the Properties view.</p>
<A NAME="TI7180"></A><h4>Value</h4>
<A NAME="TI7181"></A><p>A number that specifies the type of border. Values are:<A NAME="TI7182"></A>
<ul>
<li class=fi><FONT FACE="Courier New">0</FONT>&#8212;None</li>
<li class=ds><FONT FACE="Courier New">1</FONT>&#8212;Shadow
box</li>
<li class=ds><FONT FACE="Courier New">2</FONT>&#8212;Box</li>
<li class=ds><FONT FACE="Courier New">3</FONT>&#8212;Resize</li>
<li class=ds><FONT FACE="Courier New">4</FONT>&#8212;Underline</li>
<li class=ds><FONT FACE="Courier New">5</FONT>&#8212;3D
Lowered</li>
<li class=ds><FONT FACE="Courier New">6</FONT>&#8212;3D
Raised
</li>
</ul>
</p>
<A NAME="TI7183"></A><h4>Example</h4>
<A NAME="TI7184"></A><p>The following statement specifies that if the person represented
by the current row has a status of L (on leave), the status column
displays with a Shadow box border:<p><PRE> If(status = 'L', 1, 0)</PRE></p>
<A NAME="TI7185"></A><p>In this example, the condition is applied to the Border property
of the status column.</p>
<A NAME="TI7186"></A><p>The following is a portion of the resulting DataWindow object. Notice
that the status On Leave displays with a Shadow box border:</p>
<br><img src="images/cond080.gif">
<p><img src="images/note.gif" width=17 height=17 border=0 align="bottom" alt="Note"> <span class=shaded>About the value L and the value On Leave</span> <A NAME="TI7187"></A>The status column uses an edit style. The internal value for
on leave is L and the display value is On Leave. The conditional
expression references the internal value L, which is the actual
value stored in the database. The DataWindow object shows the value On
Leave, which is the display value assigned to the value L in the
code table for the Status edit style.</p>
<A NAME="CAICJDII"></A><h2>Brush.Color</h2>
<A NAME="TI7188"></A><h4>Description</h4>
<A NAME="TI7189"></A><p>Setting for the fill color of a graphic control.</p>
<A NAME="TI7190"></A><h4>In the painter</h4>
<A NAME="TI7191"></A><p>Brush Color on the General page in the Properties view.</p>
<A NAME="TI7192"></A><h4>Value</h4>
<A NAME="TI7193"></A><p>A number that specifies the color that fills the control.</p>
<A NAME="TI7194"></A><p>For information on specifying colors, see <A HREF="pbugp218.htm#CAIBJHCI">"Specifying colors"</A>.</p>
<A NAME="TI7195"></A><h4>Example</h4>
<A NAME="TI7196"></A><p>See the example for <A HREF="pbugp217.htm#CAIEBACD">"Brush.Hatch"</A>.</p>
<A NAME="CAIEBACD"></A><h2>Brush.Hatch</h2>
<A NAME="TI7197"></A><h4>Description</h4>
<A NAME="TI7198"></A><p>Setting for the fill pattern of a graphic control.</p>
<A NAME="TI7199"></A><h4>In the painter</h4>
<A NAME="TI7200"></A><p>Brush Hatch on the General page in the Properties view.</p>
<A NAME="TI7201"></A><h4>Value</h4>
<A NAME="TI7202"></A><p>A number that specifies the pattern that fills the control.
Values are:<A NAME="TI7203"></A>
<ul>
<li class=fi><FONT FACE="Courier New">0</FONT>&#8212;Horizontal</li>
<li class=ds><FONT FACE="Courier New">1</FONT>&#8212;Bdiagonal
(lines from lower left to upper right)</li>
<li class=ds><FONT FACE="Courier New">2</FONT>&#8212;Vertical</li>
<li class=ds><FONT FACE="Courier New">3</FONT>&#8212;Cross</li>
<li class=ds><FONT FACE="Courier New">4</FONT>&#8212;Fdiagonal
(lines from upper left to lower right)</li>
<li class=ds><FONT FACE="Courier New">5</FONT>&#8212;DiagCross</li>
<li class=ds><FONT FACE="Courier New">6</FONT>&#8212;Solid</li>
<li class=ds><FONT FACE="Courier New">7</FONT>&#8212;Transparent</li>
<li class=ds><FONT FACE="Courier New">8</FONT>&#8212;Background
(use the values on the Background tab)
</li>
</ul>
</p>
<A NAME="TI7204"></A><h4>Example</h4>
<A NAME="TI7205"></A><p>In this example, statements check the employee's
start date to see if the month is the current month or the month
following the current month. Properties of a rectangle control placed
behind the row of data are changed to highlight employees with months
of hire that match the current month or the month following the
current month.</p>
<A NAME="TI7206"></A><p>The Design view includes columns of data and a rectangle behind
the data. The rectangle has been changed to black in the following
picture to make it stand out:</p>
<br><img src="images/cond085.gif">
<A NAME="TI7207"></A><p>The following statement is for the Brush.Color property of
the rectangle. If the month of the start date matches the current
month or the next one, Brush.Color is set to light gray (12632256).
If not, it is set to white (16777215), which means it will not show:<p><PRE> If(month( start_date ) = month(today())<br>or month( start_date ) = month(today())+1<br>or (month(today()) = 12 and month(start_date)=1),<br>12632256, 16777215)</PRE></p>
<A NAME="TI7208"></A><p>The following statement is for the Brush.Hatch property of
the rectangle. If the month of the start date matches the current
month or the next one, Brush.Hatch is set to Bdiagonal (1). If not,
it is set to Transparent (7), which means it will not show:<p><PRE> If(month( start_date ) = month(today())<br>or month( start_date ) = month(today())+1<br>or (month(today()) = 12 and month(start_date)=1),<br>1, 7)</PRE></p>
<A NAME="TI7209"></A><p>Expressions are also provided for Pen.Color and Pen.Style.</p>
<A NAME="TI7210"></A><p>For more about these properties and a picture,
see <A HREF="pbugp217.htm#CAIEADFB">"Pen.Style"</A>.</p>
<A NAME="CAIDAJJC"></A><h2>Color</h2>
<A NAME="TI7211"></A><h4>Description</h4>
<A NAME="TI7212"></A><p>The color of text for text controls, columns, and computed
fields; background color for the DataWindow object; line color for graphs.</p>
<A NAME="TI7213"></A><h4>In the painter</h4>
<A NAME="TI7214"></A><p>In the Properties view, Text Color on the Font property page;
Color on the Background property page; Line Color on the General
property page.</p>
<A NAME="TI7215"></A><h4>Value</h4>
<A NAME="TI7216"></A><p>A number that specifies the color used for text.</p>
<A NAME="TI7217"></A><p>For information on specifying colors, see <A HREF="pbugp218.htm#CAIBJHCI">"Specifying colors"</A>.</p>
<A NAME="TI7218"></A><h4>Example</h4>
<A NAME="TI7219"></A><p>The following statement is for the Color property of the <b>emp_id</b>, <b>emp_fname</b>, <b>emp_lname</b>,
and <b>emp_birth_date</b> columns:<p><PRE> If(month(birth_date) = month (today()), 255, 0)</PRE></p>
<A NAME="TI7220"></A><p>If the employee has a birthday in the current month, the information
for the employee displays in red (255). Otherwise, the information
displays in black (0).</p>
<A NAME="TI7221"></A><p>The Font.Underline property has the same conditional expression
defined for it so that the example shows clearly on paper when printed
in black and white.</p>
<A NAME="CAIBHCDI"></A><h2>Font.Escapement (for rotating controls)</h2>
<A NAME="TI7222"></A><h4>Description</h4>
<A NAME="TI7223"></A><p>The angle of rotation from the baseline of the text.</p>
<A NAME="TI7224"></A><h4>In the painter</h4>
<A NAME="TI7225"></A><p>Escapement on the Font page in the Properties view.</p>
<A NAME="TI7226"></A><h4>Value</h4>
<A NAME="TI7227"></A><p>An integer in tenths of degrees. For example, 450 means 45
degrees. 0 is horizontal.</p>
<A NAME="TI7228"></A><h4>Example</h4>
<A NAME="TI7229"></A><p>To enter rotation for a control, select the control in the
Design view and click the button next to the Escapement property
in the Properties view. In the dialog box that displays, enter the
number of tenths of degrees.</p>
<A NAME="TI7230"></A><p>The following picture shows the Design view with a number
of text controls. Each text control shows the Font.Escapement value
entered and the number of degrees of rotation. In the Design view,
you do not see rotation; it looks as if the controls are all mixed
up. Two controls seem to overlie each other:</p>
<br><img src="images/cond100.gif">
<A NAME="TI7231"></A><p>The next picture shows the same controls at runtime. Each
control is rotated appropriately:</p>
<br><img src="images/cond105.gif">
<p><img src="images/note.gif" width=17 height=17 border=0 align="bottom" alt="Note"> <span class=shaded>How to position controls that are rotated</span> <A NAME="TI7232"></A>Make the controls movable. To do so, display each control
and select the Moveable check box in the Position page. Then in
the Preview view, click the rotated text control until a gray box
displays (try the center of the text). Drag the rotated control
where you want it. In the Design view, the controls will be wherever
you dragged them. They may look incorrectly positioned in the Design
view, but they will be correctly positioned when you run the DataWindow object.
When you are satisfied with the positioning, you can clear the Moveable
check box for the controls to ensure that they stay where you want
them.</p>
<A NAME="CAIEAHGE"></A><h2>Font.Height</h2>
<A NAME="TI7233"></A><h4>Description</h4>
<A NAME="TI7234"></A><p>The height of the text.</p>
<A NAME="TI7235"></A><h4>In the painter</h4>
<A NAME="TI7236"></A><p>Size on the Font page in the Properties view.</p>
<A NAME="TI7237"></A><h4>Value</h4>
<A NAME="TI7238"></A><p>An integer in the unit of measure specified for the DataWindow object.
Units of measure include PowerBuilder units, thousandths of an inch
(1000 = 1 inch), thousandths of a centimeter (1000 = 1
centimeter), or pixels. To specify size in points, specify a negative
number.</p>
<A NAME="TI7239"></A><h4>Example</h4>
<A NAME="TI7240"></A><p>The following statement is specified for the Font.Height property
of a text control. Note that the DataWindow object is defined as using
thousandths of an inch as its unit of measure. The statement says
that if the control is in the first row, show the text 1/2-inch
high (500 1/1000ths of an inch) and if it is not the first,
show the text 1/5-inch high (200 1/1000ths of
an inch):<p><PRE> If(GetRow() = 1, 500, 200)</PRE></p>
<A NAME="TI7241"></A><p>The boundaries of the control might need to be extended to
allow for the increased size of the text. At runtime, the first
occurrence of the text control is big (1/2 inch); subsequent
ones are small (1/5 inch). </p>
<A NAME="CAIBCIHG"></A><h2>Font.Italic</h2>
<A NAME="TI7242"></A><h4>Description</h4>
<A NAME="TI7243"></A><p>A number that specifies whether the text should be italic.</p>
<A NAME="TI7244"></A><h4>In the painter</h4>
<A NAME="TI7245"></A><p>Italic on the Font page in the Properties view.</p>
<A NAME="TI7246"></A><h4>Value</h4>
<A NAME="TI7247"></A><p>Values are:<A NAME="TI7248"></A>
<ul>
<li class=fi><FONT FACE="Courier New">0</FONT>&#8212;Not
italic</li>
<li class=ds><FONT FACE="Courier New">1</FONT>&#8212;Italic
</li>
</ul>
</p>
<A NAME="TI7249"></A><h4>Example</h4>
<A NAME="TI7250"></A><p>The following statements are specified for the Font.Italic,
Font.Underline, and Font.Weight properties, respectively. If the
employee has health insurance, the employee's information
displays in italics. If not, the employee's information displays
in bold and underlined:<p><PRE> If(bene_health_ins = 'Y', 1, 0)<br>If(bene_health_ins = 'N', 1, 0)<br>If(bene_health_ins = 'N', 700, 400)</PRE></p>
<A NAME="TI7251"></A><p>Statements are specified in this way for four controls: the <b>emp_id</b> column,
the <b>emp_fname</b> column, the <b>emp_lname</b> column,
and the <b>emp_salary</b> column. In the
resulting DataWindow object, those with health insurance display in italics. Those
without health insurance are emphasized with bold and underlining:</p>
<br><img src="images/cond120.gif">
<A NAME="CAIDIIJE"></A><h2>Font.Strikethrough</h2>
<A NAME="TI7252"></A><h4>Description</h4>
<A NAME="TI7253"></A><p>A number that specifies whether the text should be crossed
out.</p>
<A NAME="TI7254"></A><h4>In the painter</h4>
<A NAME="TI7255"></A><p>Strikeout on the Font page in the Properties view.</p>
<A NAME="TI7256"></A><h4>Value</h4>
<A NAME="TI7257"></A><p>Values are:<A NAME="TI7258"></A>
<ul>
<li class=fi><FONT FACE="Courier New">0</FONT>&#8212;Not
crossed out</li>
<li class=ds><FONT FACE="Courier New">1</FONT>&#8212;Crossed
out
</li>
</ul>
</p>
<A NAME="TI7259"></A><h4>Example</h4>
<A NAME="TI7260"></A><p>The following statement is for the Font.Strikethrough property
of the <b>emp_id</b>, <b>emp_fname</b>, <b>emp_lname</b>,
and <b>emp_salary</b> columns. The status
column must be included in the data source even though it does not
appear in the DataWindow object itself. The statement says that if the
employee's status is L, which means On Leave, cross out
the text in the control:<p><PRE> If(status = 'L', 1, 0)</PRE></p>
<A NAME="TI7261"></A><p>An extra text control is included to the right of the detail
line. It becomes visible only if the status of the row is L (see <A HREF="pbugp217.htm#CAIDBCGI">"Visible"</A>).</p>
<A NAME="TI7262"></A><p>The following is a portion of the resulting DataWindow object. It
shows two employees who are On Leave. The four columns of information
show as crossed out:</p>
<br><img src="images/cond125.gif">
<A NAME="CAIBFBEH"></A><h2>Font.Underline</h2>
<A NAME="TI7263"></A><h4>Description</h4>
<A NAME="TI7264"></A><p>A number that specifies whether the text should be underlined.</p>
<A NAME="TI7265"></A><h4>In the painter</h4>
<A NAME="TI7266"></A><p>Underline on the Font page in the Properties view.</p>
<A NAME="TI7267"></A><h4>Value</h4>
<A NAME="TI7268"></A><p>Values are:<A NAME="TI7269"></A>
<ul>
<li class=fi><FONT FACE="Courier New">0</FONT>&#8212;Not
underlined</li>
<li class=ds><FONT FACE="Courier New">1</FONT>&#8212;Underlined
</li>
</ul>
</p>
<A NAME="TI7270"></A><h4>Example</h4>
<A NAME="TI7271"></A><p>The following statement, when applied to the Font.Underline
property of columns of employee information, causes the information
to be underlined if the employee does not have health insurance:<p><PRE> If(bene_health_ins = 'N', 1, 0)</PRE></p>
<A NAME="TI7272"></A><p>For pictures of this example, see <A HREF="pbugp217.htm#CAIBCIHG">"Font.Italic"</A>.</p>
<A NAME="CAIDCBID"></A><h2>Font.Weight</h2>
<A NAME="TI7273"></A><h4>Description</h4>
<A NAME="TI7274"></A><p>The weight of the text.</p>
<A NAME="TI7275"></A><h4>In the painter</h4>
<A NAME="TI7276"></A><p>Bold on the Font page in the Properties view.</p>
<A NAME="TI7277"></A><h4>Value</h4>
<A NAME="TI7278"></A><p>Values are:<A NAME="TI7279"></A>
<ul>
<li class=fi><FONT FACE="Courier New">100</FONT>&#8212;Thin</li>
<li class=ds><FONT FACE="Courier New">200</FONT>&#8212;Extra
light</li>
<li class=ds><FONT FACE="Courier New">300</FONT>&#8212;Light</li>
<li class=ds><FONT FACE="Courier New">400</FONT>&#8212;Normal</li>
<li class=ds><FONT FACE="Courier New">500</FONT>&#8212;Medium</li>
<li class=ds><FONT FACE="Courier New">600</FONT>&#8212;Semibold </li>
<li class=ds><FONT FACE="Courier New">700</FONT>&#8212;Bold </li>
<li class=ds><FONT FACE="Courier New">800</FONT>&#8212;Extrabold </li>
<li class=ds><FONT FACE="Courier New">900</FONT>&#8212;Heavy 
</li>
</ul>
</p>
<p><img src="images/note.gif" width=17 height=17 border=0 align="bottom" alt="Note"> <span class=shaded>Most commonly used values</span> <A NAME="TI7280"></A>The most commonly used values are 400 (Normal) and 700 (Bold).
Your printer driver might not support all of the settings.</p>
<A NAME="TI7281"></A><h4>Example</h4>
<A NAME="TI7282"></A><p>The following statement, when applied to the Font.Weight property
of columns of employee information, causes the information to be
displayed in bold if the employee does not have health insurance:<p><PRE> If(bene_health_ins = 'N', 700, 400)</PRE></p>
<A NAME="TI7283"></A><p>For pictures of this example, see <A HREF="pbugp217.htm#CAIBCIHG">"Font.Italic"</A>.</p>
<A NAME="CAICAFCH"></A><h2>Format</h2>
<A NAME="TI7284"></A><h4>Description</h4>
<A NAME="TI7285"></A><p>The display format for a column.</p>
<A NAME="TI7286"></A><h4>In the painter</h4>
<A NAME="TI7287"></A><p>Format on the Format page in the Properties view.</p>
<A NAME="TI7288"></A><h4>Values</h4>
<A NAME="TI7289"></A><p>A string specifying the display format.</p>
<A NAME="TI7290"></A><h4>Example</h4>
<A NAME="TI7291"></A><p>The following statement, when applied to the Format property
of the Salary column, causes the column to display the word <FONT FACE="Courier New">Overpaid</FONT> for
any salary greater than $60,000 and <FONT FACE="Courier New">Underpaid</FONT> for
any salary under $60,000:<p><PRE> If(salary&gt;60000, 'Overpaid', 'Underpaid')</PRE></p>
<p><img src="images/note.gif" width=17 height=17 border=0 align="bottom" alt="Note"> <span class=shaded>Edit Mask edit style change</span> <A NAME="TI7292"></A>The Edit Mask edit style assigned to the salary column had
to be changed. Because edit styles take precedence over display
formats, it was necessary to change the edit style assigned to the
salary column (an Edit Mask edit style) to the Edit edit style.</p>
<A NAME="CAIEAIGD"></A><h2>Height</h2>
<A NAME="TI7293"></A><h4>Description</h4>
<A NAME="TI7294"></A><p>The height of the column or other control.</p>
<A NAME="TI7295"></A><h4>In the painter</h4>
<A NAME="TI7296"></A><p>Height on the Position page in the Properties view.</p>
<A NAME="TI7297"></A><h4>Value</h4>
<A NAME="TI7298"></A><p>An integer in the unit of measure specified for the DataWindow object.
Units of measure include PowerBuilder units, thousandths of an inch
(1000 = 1 inch), thousandths of a centimeter (1000 = 1
centimeter), or pixels.</p>
<A NAME="TI7299"></A><h4>Example</h4>
<A NAME="TI7300"></A><p>The following statement causes the height of a rectangle to
be 160 PowerBuilder units if the state column for the row has the
value NY. Otherwise, the rectangle is 120 PowerBuilder units high:<p><PRE> if (state = 'NY', 160, 120)</PRE></p>
<A NAME="TI7301"></A><p>For more details and pictures, see <A HREF="pbugp216.htm#CAICCAFD">"Example 4: changing the
size and location of controls"</A>.</p>
<A NAME="CAIBFEDB"></A><h2>Pen.Color</h2>
<A NAME="TI7302"></A><h4>Description</h4>
<A NAME="TI7303"></A><p>The color of the line or the outline of a graphic control.</p>
<A NAME="TI7304"></A><h4>In the painter</h4>
<A NAME="TI7305"></A><p>Pen Color on the General page in the Properties view.</p>
<A NAME="TI7306"></A><h4>Value</h4>
<A NAME="TI7307"></A><p>A number that specifies the color of the line or outline.</p>
<A NAME="TI7308"></A><p>For information on specifying colors, see <A HREF="pbugp218.htm#CAIBJHCI">"Specifying colors"</A>.</p>
<A NAME="TI7309"></A><h4>Example</h4>
<A NAME="TI7310"></A><p>See the example for the Pen.Style property, next.</p>
<A NAME="CAIEADFB"></A><h2>Pen.Style</h2>
<A NAME="TI7311"></A><h4>Description</h4>
<A NAME="TI7312"></A><p>The style of the line or the outline of a graphic control.</p>
<A NAME="TI7313"></A><h4>In the painter</h4>
<A NAME="TI7314"></A><p>Pen Style on the General page in the Properties view.</p>
<A NAME="TI7315"></A><h4>Value</h4>
<A NAME="TI7316"></A><p>Values are:<A NAME="TI7317"></A>
<ul>
<li class=fi><FONT FACE="Courier New">0</FONT>&#8212;Solid</li>
<li class=ds><FONT FACE="Courier New">1</FONT>&#8212;Dash</li>
<li class=ds><FONT FACE="Courier New">2</FONT>&#8212;Dotted</li>
<li class=ds><FONT FACE="Courier New">3</FONT>&#8212;Dash-dot
pattern</li>
<li class=ds><FONT FACE="Courier New">4</FONT>&#8212;Dash-dot-dot
pattern</li>
<li class=ds><FONT FACE="Courier New">5</FONT>&#8212;Null
(no visible line)
</li>
</ul>
</p>
<A NAME="TI7318"></A><h4>Example</h4>
<A NAME="TI7319"></A><p>In this example, statements check the employee's
start date to see if the month is the current month or the month
following the current month. Properties of a rectangle control placed
behind the row of data are changed to highlight employees with months
of hire that match the current month or the month following the
current month.</p>
<A NAME="TI7320"></A><p>The Design view includes columns of data and a rectangle behind
the data. The rectangle has been changed to black in the following
picture to make it stand out:</p>
<br><img src="images/cond135.gif">
<A NAME="TI7321"></A><p>The following statement is for the Pen.Color property of the
line around the edge of the rectangle. If the month of the start
date matches the current month or the next one, Pen.Color is set
to light gray (12632256). If not, it is set to white (16777215),
which means it will not show:<p><PRE> If(month( start_date ) = month(today())<br>or month( start_date ) = month(today())+1<br>or (month(today()) = 12 and month(start_date)=1),<br>12632256, 16777215)</PRE></p>
<A NAME="TI7322"></A><p>The following statement is for the Pen.Style property of the
rectangle. If the month of the start date matches the current month
or the next one, Pen.Style is set to Solid (0). If not, it is set
to NULL (5), which means it will not show:<p><PRE> If(month( start_date ) = month(today())<br>or month( start_date ) = month(today())+1<br>or (month(today()) = 12 and month(start_date)=1),<br>0, 5)</PRE></p>
<A NAME="TI7323"></A><p>Expressions are also defined for Brush.Color and Brush.Hatch.</p>
<A NAME="TI7324"></A><p>For more about these properties, see <A HREF="pbugp217.htm#CAIEBACD">"Brush.Hatch"</A>.</p>
<A NAME="TI7325"></A><p>The following is a portion of the resulting DataWindow object. A
rectangle with light gray cross-hatching highlights employees whose
reviews are due soon. The line enclosing the rectangle is Light
Gray and uses the pen style Solid (0):</p>
<br><img src="images/cond090.gif">
<A NAME="CAIEAHDJ"></A><h2>Pen.Width</h2>
<A NAME="TI7326"></A><h4>Description</h4>
<A NAME="TI7327"></A><p>The width of the line or the outline of a graphic control.</p>
<A NAME="TI7328"></A><h4>In the painter</h4>
<A NAME="TI7329"></A><p>Pen Width on the General page in the Properties view.</p>
<A NAME="TI7330"></A><h4>Value</h4>
<A NAME="TI7331"></A><p>An integer in the unit of measure specified for the DataWindow object.
Units of measure include PowerBuilder units, thousandths of an inch
(1000 = 1 inch), thousandths of a centimeter (1000 = 1
centimeter), or pixels.</p>
<A NAME="TI7332"></A><h4>Example</h4>
<A NAME="TI7333"></A><p>The following statement causes the width of a line to be 10 PowerBuilder
units if the state column for the row has the value NY. Otherwise,
the line is 4 PowerBuilder units wide:<p><PRE> If(state = 'NY', 10, 4)</PRE></p>
<A NAME="TI7334"></A><p>For more details and pictures, see <A HREF="pbugp216.htm#CAICCAFD">"Example 4: changing the
size and location of controls"</A>.</p>
<A NAME="CAIEBCGD"></A><h2>Pointer</h2>
<A NAME="TI7335"></A><h4>Description</h4>
<A NAME="TI7336"></A><p>The image used for the mouse pointer when the pointer is over
the specified control.</p>
<A NAME="TI7337"></A><h4>In the painter</h4>
<A NAME="TI7338"></A><p>Pointer on the Pointer page in the Properties view.</p>
<A NAME="TI7339"></A><h4>Value</h4>
<A NAME="TI7340"></A><p>A string that specifies a value of the Pointer enumerated
data type or the name of a cursor file (CUR) used for the pointer.</p>
<A NAME="TI7341"></A><p>Values of the Pointer enumerated data type are:<A NAME="TI7342"></A>
<ul>
<li class=fi>Arrow!</li>
<li class=ds>Cross!</li>
<li class=ds>HourGlass!</li>
<li class=ds>IBeam!</li>
<li class=ds>Icon!</li>
<li class=ds>Size!</li>
<li class=ds>SizeNESW!</li>
<li class=ds>SizeNS!</li>
<li class=ds>SizeNWSE!</li>
<li class=ds>SizeWE!</li>
<li class=ds>UpArrow!
</li>
</ul>
</p>
<A NAME="TI7343"></A><h4>Example</h4>
<A NAME="TI7344"></A><p>The following condition, entered for the Pointer property
of every control in a row of expense data, changes the pointer to
a column every time the value in the expense column exceeds $100,000.
Note that the pointer has no meaning in a printed report. The pointer
is for use on the screen display of a DataWindow object:<p><PRE> If(expense 100000, 'pbcolumn.cur', 'arrow!')</PRE></p>
<A NAME="BABBCJCB"></A><h2>Protect</h2>
<A NAME="TI7345"></A><h4>Description</h4>
<A NAME="TI7346"></A><p>The protection setting of a column.</p>
<A NAME="TI7347"></A><h4>In the painter</h4>
<A NAME="TI7348"></A><p>Protect on the General page in the Properties view.</p>
<A NAME="TI7349"></A><h4>Value</h4>
<A NAME="TI7350"></A><p>Values are:<A NAME="TI7351"></A>
<ul>
<li class=fi><FONT FACE="Courier New">0</FONT>&#8212;False,
the column is not protected</li>
<li class=ds><FONT FACE="Courier New">1</FONT>&#8212;True,
the column is protected
</li>
</ul>
</p>
<A NAME="BABCFFEB"></A><h2>Timer_Interval</h2>
<A NAME="TI7352"></A><h4>Description</h4>
<A NAME="TI7353"></A><p>The number of milliseconds between the internal timer events.</p>
<A NAME="TI7354"></A><h4>In the painter</h4>
<A NAME="TI7355"></A><p>Timer Interval on the General page in the Properties view.</p>
<A NAME="TI7356"></A><h4>Value</h4>
<A NAME="TI7357"></A><p>The default is 0 (which is defined to mean 60,000 milliseconds
or one minute). </p>
<A NAME="CAIDBCGI"></A><h2>Visible</h2>
<A NAME="TI7358"></A><h4>Description</h4>
<A NAME="TI7359"></A><p>Whether the control is visible in the DataWindow object.</p>
<A NAME="TI7360"></A><h4>In the painter</h4>
<A NAME="TI7361"></A><p>Visible on the General page in the Properties view.</p>
<A NAME="TI7362"></A><h4>Value</h4>
<A NAME="TI7363"></A><p>Values are:<A NAME="TI7364"></A>
<ul>
<li class=fi><FONT FACE="Courier New">0</FONT>&#8212;Not
visible</li>
<li class=ds><FONT FACE="Courier New">1</FONT>&#8212;Visible
</li>
</ul>
</p>
<A NAME="TI7365"></A><h4>Example</h4>
<A NAME="TI7366"></A><p>The following statement is for the Visible property of a text
control with the words On Leave located to the right of columns
of employee information. The statement says that if the current
employee's status is L, which means On Leave, the text
control is visible. Otherwise, it is invisible:<p><PRE> If(status = 'L', 1, 0)</PRE></p>
<p><img src="images/note.gif" width=17 height=17 border=0 align="bottom" alt="Note"> <span class=shaded>The status column must be retrieved</span> <A NAME="TI7367"></A>The status column must be included in the data source even
though it does not appear in the DataWindow object itself.</p>
<A NAME="TI7368"></A><p>The Design view includes the text control at the right-hand
end of the detail line. The text control is visible at runtime only
if the value of the status column for the row is L.</p>
<A NAME="TI7369"></A><p>In the resulting DataWindow object, the text control is visible only
for the two employees on leave. For a picture, see <A HREF="pbugp217.htm#CAIDIIJE">"Font.Strikethrough"</A>.</p>
<A NAME="CAIBJCCI"></A><h2>Width</h2>
<A NAME="TI7370"></A><h4>Description</h4>
<A NAME="TI7371"></A><p>The width of the control.</p>
<A NAME="TI7372"></A><h4>In the painter</h4>
<A NAME="TI7373"></A><p>Width on the Position page in the Properties view.</p>
<A NAME="TI7374"></A><h4>Value</h4>
<A NAME="TI7375"></A><p>An integer in the unit of measure specified for the DataWindow object.
Units of measure include PowerBuilder units, thousandths of an inch
(1000 = 1 inch), thousandths of a centimeter (1000 = 1
centimeter), or pixels.</p>
<A NAME="TI7376"></A><h4>Example</h4>
<A NAME="TI7377"></A><p>The following statement causes the width of a rectangle to
be 500 PowerBuilder units if the state column for the row has the
value NY. Otherwise, the rectangle is 1000 PowerBuilder units wide:<p><PRE> if (state = 'NY', 500, 1000)</PRE></p>
<A NAME="TI7378"></A><p>For more details and pictures, see <A HREF="pbugp216.htm#CAICCAFD">"Example 4: changing the
size and location of controls"</A>.</p>
<A NAME="CAIDHAAF"></A><h2>X</h2>
<A NAME="TI7379"></A><h4>Description</h4>
<A NAME="TI7380"></A><p>The distance of the control from the left edge of the DataWindow object.
At runtime, the distance from the left edge of the DataWindow object is
calculated by adding the margin to the x value.</p>
<A NAME="TI7381"></A><h4>In the painter</h4>
<A NAME="TI7382"></A><p>X on the Position page in the Properties view.</p>
<A NAME="TI7383"></A><h4>Value</h4>
<A NAME="TI7384"></A><p>An integer in the unit of measure specified for the DataWindow object.
Units of measure include PowerBuilder units, thousandths of an inch
(1000 = 1 inch), thousandths of a centimeter (1000 = 1
centimeter), or pixels.</p>
<A NAME="TI7385"></A><h4>Example</h4>
<A NAME="TI7386"></A><p>The following statement causes a rectangle to be located 6.250
inches from the left if the state column for the row has the value
NY. Otherwise, the rectangle is 4.000 inches from the left:<p><PRE> If(state = 'NY', 6250, 4000)</PRE></p>
<A NAME="TI7387"></A><p>For more details and pictures, see <A HREF="pbugp216.htm#CAICCAFD">"Example 4: changing the
size and location of controls"</A>.</p>
<A NAME="CAICEIIC"></A><h2>X1, X2</h2>
<A NAME="TI7388"></A><h4>Description</h4>
<A NAME="TI7389"></A><p>The distance of each end of the line from the left edge of
the DataWindow object as measured in the Design view. At runtime, the distance
from the left edge of the DataWindow object is calculated by adding the
margin to the x1 and x2 values.</p>
<A NAME="TI7390"></A><h4>In the painter</h4>
<A NAME="TI7391"></A><p>X1, X2 on the Position page in the Properties view.</p>
<A NAME="TI7392"></A><h4>Value</h4>
<A NAME="TI7393"></A><p>Integers in the unit of measure specified for the DataWindow object.
Units of measure include PowerBuilder units, thousandths of an inch
(1000 = 1 inch), thousandths of a centimeter (1000 = 1
centimeter), or pixels.</p>
<A NAME="TI7394"></A><h4>Example</h4>
<A NAME="TI7395"></A><p>The following statements for the X1 and X2 properties of a
line cause the line to extend from 6.250 to 7.150 inches from the
left if the state column for the row has the value NY. Otherwise,
the line extends from 4.000 to 6.000 inches from the left:<p><PRE> If(state = 'NY', 6250, 4000)<br>If(state = 'NY', 7150, 6000)</PRE></p>
<A NAME="TI7396"></A><p>For more details and pictures, see <A HREF="pbugp216.htm#CAICCAFD">"Example 4: changing the
size and location of controls"</A>.</p>
<A NAME="CAIDJCEB"></A><h2>Y</h2>
<A NAME="TI7397"></A><h4>Description</h4>
<A NAME="TI7398"></A><p>The distance of the control from the top of the band in which
the control is located.</p>
<A NAME="TI7399"></A><h4>In the painter</h4>
<A NAME="TI7400"></A><p>Y on the Position page in the Properties view.</p>
<A NAME="TI7401"></A><h4>Value</h4>
<A NAME="TI7402"></A><p>An integer in the unit of measure specified for the DataWindow object.
Units of measure include PowerBuilder units, thousandths of an inch
(1000 = 1 inch), thousandths of a centimeter (1000 = 1
centimeter), or pixels.</p>
<A NAME="TI7403"></A><h4>Example</h4>
<A NAME="TI7404"></A><p>For information, see <A HREF="pbugp216.htm#CAICCAFD">"Example 4: changing the
size and location of controls"</A>.</p>
<A NAME="CAIBHJBJ"></A><h2>Y1, Y2</h2>
<A NAME="TI7405"></A><h4>Description</h4>
<A NAME="TI7406"></A><p>The distance of each end of the specified line from the top
of the band in which the line is located.</p>
<A NAME="TI7407"></A><h4>In the painter</h4>
<A NAME="TI7408"></A><p>Y1, Y2 on the Position page in the Properties view.</p>
<A NAME="TI7409"></A><h4>Value</h4>
<A NAME="TI7410"></A><p>Integers in the unit of measure specified for the DataWindow object.
Units of measure include PowerBuilder units, thousandths of an inch
(1000 = 1 inch), thousandths of a centimeter (1000 = 1
centimeter), or pixels.</p>
<A NAME="TI7411"></A><h4>Example</h4>
<A NAME="TI7412"></A><p>The following statements for the Y1 and Y2 properties of a
line cause the line to be located .400 inches (Y1 and Y2 equal .400
inches) from the top of the detail band, if the state column for
the row has the value NY. Otherwise, the line is located .250 inches
(Y1 and Y2 equal .250 inches) from the top of the detail band:<p><PRE> If(state = 'NY', 400, 250)<br>If(state = 'NY', 400, 250)</PRE></p>
<A NAME="TI7413"></A><p>For more details and pictures, see <A HREF="pbugp216.htm#CAICCAFD">"Example 4: changing the
size and location of controls"</A>.</p>

